/**
 * Created by cqb32_000 on 2016-12-16.
 */

module.exports = {

    getSensor: function(sen_id, cback, scope){
        var sql = `select a.*,b.* from mps_satellite a, mps_sensor b 
        where b.sat_id=a.sat_id and b.sen_id=?`;

        console.log(this.db.query);
        this.db.query(sql, {
            raw: true,
            type: this.db.QueryTypes.SELECT,
            replacements: [sen_id]
        }).then((res)=>{
            console.log(arguments);
            // cback.call(scope,null,res.dataValues)
        }).catch((err)=>{
            console.log("eeeee");
            // cback.call(scope,err,null);
        });
    }
};